package ms.platform.system.service;

import ms.platform.system.dao.AdminDAO;
import ms.platform.system.model.Admin;
import ms.platform.system.model.Manufacturer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(propagation=Propagation.SUPPORTS)
public class IndexService {
	
	@Autowired
	private AdminDAO adminDAO;
	
	public Admin login(String username){
		return adminDAO.queryAdminByUsername(username);
	}

	public Manufacturer queryEail(String username){
		return adminDAO.queryEail(username);
	}

	public Admin getAdminById(Integer adminId) {
		return adminDAO.queryAdminById(adminId);
	}

}
